<!doctype html>
<html>
<head>
    <title>系统配置</title>
    <?php $this->load->module('admin/index/page_header');?>
</head>
<body>
<div class="wrap">
<div class="table_full">
<form class="" action="<?php echo $form_url?>" method="post">
<div class="table_list">
    <div class="h_a">高级搜索</div>
    <table width="100%">
        <tbody>
        <tr>
            <td>
                站点名：<input type="text" value="<?php echo $condition['name']?>" placeholder="名称" name="name" class="input rounded" size="26" />&nbsp;&nbsp;
                网址：<input type="text" value="<?php echo $condition['url']?>" placeholder="url" name="url" class="input rounded" size="20" />&nbsp;&nbsp;
                <?php if(!$disable):?>
                城市：
                <select name="province" id="province" onchange="_showdistrict(['continent', 'country', 'province', 'city'], 3)">
                    <option value="-1" did="-1">选择省</option>
                </select>
                <select name="city" id="city">
                    <option value="-1" did="-1">选择市</option>
                </select>
                <?php endif;?>
                <input type="hidden" name="disable" value="<?php echo $disable?>" >
                <input type="submit" class="btn" value="搜索"></td>
            </td>
        </tr>
        </tbody>
    </table>
<table width="100%" class="tab_label" id="general_config">
    <tr>
        <td width="50"><input type="checkbox" id="sel_all"  value="1"/></td>
        <td><b>网站名称</b></td>
        <td><b>网址</b></td>
    </tr>
    <?php foreach ($list as $site) { ?>
        <tr>
            <td class="btn_min" align="left">
            <input type="checkbox" name="site" value="<?php echo $site['sid']?>">
            </td>
            <td><?php echo $site['name']?></td>
            <td><?php echo $site['url'];?></td>
        </tr>
    <?php }?>
</table>
</div>
    <div class="page_nav">
        <?php echo $this->mypageclass->show(2); ?>
    </div>
</form>
</div>
</div>
<script type="text/javascript">
    var district_url = '<?php echo site_url('admin/api/city_fetch/?id=')?>';
    _showdistrict(['continent', 'country', 'province', 'city','district'], 2, 40002, [<?php echo $condition['province'];?>, <?php echo $condition['city'];?>]);
    $(function(){
        $('#sel_all').click(function(){
            $('input[name="site"]').prop("checked",this.checked);
        });
    });;
</script>
</body>
</html>